Skip to content

Check sequential pivots against the eliminated graph - #2929

Open
DLuminary wants to merge 1 commit into
borglab:developfrom
DLuminary:fix/sequential-pivot-check
Open

DLuminary wants to merge 1 commit into
borglab:developfrom
DLuminary:fix/sequential-pivot-check

Conversation

@DLuminary

Copy link
Copy Markdown
Contributor

Addresses part 2 of #2903.

Sequential elimination compares each pivot with the diagonal that reaches its own step. When a dependency is revealed while eliminating an earlier variable, that diagonal is already round-off, so the check passes and the solve returns an arbitrary step. Multifrontal elimination reports the same graphs.

This PR adds GaussianBayesNet::checkPivots. It compares each pivot with the Hessian diagonal of the eliminated graph's unconstrained factors. Hard constraints have no information scale, so they neither count towards that diagonal nor are checked. It is called in the sequential branches of NonlinearOptimizer::solve (Gauss-Newton and LM) and DoglegOptimizer.

The tolerances are at round-off level, so only systems without usable digits are reported:

  • QR: the existing 64ε safeguard, squared.
  • Cholesky: 2⁻⁴⁰, above the round-off floor of exactly dependent columns (below 1e-13 in dense tests with up to 6000 unknowns).

What does not change: the near-indeterminate check during elimination (2⁻²⁸), multifrontal elimination, and iSAM2.

Effect. Gauss-Newton, one iteration, on 30 Pose2 graphs with loop closures and no prior (default ordering):

Solver develop This PR
SEQUENTIAL_QR throws 0 of 30; poses move up to 640 m throws 30 of 30
SEQUENTIAL_CHOLESKY throws 25 of 30; poses move up to 2.8 m throws 30 of 30
MULTIFRONTAL_QR, MULTIFRONTAL_CHOLESKY throws 30 of 30 throws 30 of 30

On the well-posed graphs from #2903 (100 m to 10 km), every solver gives the same iterations and errors as on develop.

Tests.

  • GaussianBayesNet.CheckPivots: the reference diagonal, both tolerances, the reported key, and zero and NaN pivots.
  • GaussianBayesNet.CheckPivotsIgnoresConstraints: constrained conditionals are skipped, and constrained factors don't inflate the reference.
  • NonlinearOptimizer.SquareLoopWithoutPriorReportsIndeterminateSystem: Gauss-Newton and Dogleg with all four sequential and multifrontal solvers. It fails on develop for SEQUENTIAL_QR.

I ran testGaussianBayesNet, testNonlinearOptimizer, testGaussianFactorGraph, testGaussianBayesTree, testJacobianFactor and testHessianFactor; all pass.

Sequential elimination compares each pivot with the diagonal that reaches
its own step. When a dependency is revealed while eliminating an earlier
variable, that diagonal is already round-off, the check passes, and the
solve returns an arbitrary step: Gauss-Newton with SEQUENTIAL_QR moves the
poses of a pose graph without a prior by hundreds of meters instead of
reporting the free gauge (borglab#2903).

Add GaussianBayesNet::checkPivots, which compares each pivot with the
Hessian diagonal of the eliminated graph's unconstrained factors, and call
it in the sequential branches of NonlinearOptimizer::solve and
DoglegOptimizer. The tolerances are at round-off level, so only systems
without usable digits are reported: the QR safeguard squared, and 2^-40
for Cholesky. The near-indeterminate check during elimination is unchanged.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant